-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CMTAT release v2.3.1 #210
Merged
CMTAT release v2.3.1 #210
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Merge master into dev
Add ERC20 decimals as an argument of the initialize function
* For loops and function arguments optimization * Substitute require statements with custom errors
Coherence name with OZ
…idity version to 0.8.20, update code and test for MetaTxModule, replace _beforeTokenTransfer by _update
…est through Hardhat + update SnapshotModule test to support Hardhat and upgrade to the latest OpenZeppelin version
Architecture refactoring
…e, ERC20SnapshotModule
AccessControlDefaultAdminRules improvement
Add contract version
… Solidity files, update doc
Docv v2.3.1
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
enhancement
New feature or request
Next release
The issue has been merged into dev and will be part of the next release
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Architecture
mandatory
is renamed incore
(Architecture refactoring #222)optional
is renamed inextensions
(Architecture refactoring #222)controllers
which for the moment contains only the ValidationModule (Architecture refactoring #222)Gas optimization
See Defining Industry Standards for Custom Error Messages
Other
Until now, the number of decimal was set inside the code to the value 0
This release changes this behavior to use instead a parameter supplied by the deployer inside the function initialize.
The alternative function is the function
deactivateContract
inside the PauseModule, to deactivate the contract. This function set a boolean state variableisDeactivated
to true and puts the contract in the pause state. The functionunpause
is updated to revert if the previous variable is set to true, thus the contract is in the pause state "forever".The consequences are the following:
In standalone mode, this operation is irreversible, it is not possible to rollback.
With a proxy, it is still possible to rollback by deploying a new implementation.
Tools
Security
AccessControlDefaultAdminRules
(Add AccessControlDefaultAdminRules #220)This contract implements the following risk mitigations on top of AccessControl:
Only one account holds the DEFAULT_ADMIN_ROLE since deployment until it’s potentially renounced.
Enforces a 2-step process to transfer the DEFAULT_ADMIN_ROLE to another account.
Enforces a configurable delay between the two steps, with the ability to cancel before the transfer is accepted.
Add a function
transferadminshipDirectly
(AccessControlDefaultAdminRules improvement #226)Remove the module
OnlyDelegateCallModule
since it was used to protect the functionkill
, which has been removed in this version ([#221](Remove the function kill #221)).Tasks
--Concerned functions: mint, burn and transfer
--Close with the PR Batch functions #208
--Close with the PR Coherence name with OZ #211
--Close with the PR Remove the function kill #221
--Close with the PR Custom error with hardhat support #217
--Close with the PR Add contract version #229
--Close with the PR Add ERC20 decimals as an argument of the initialize function #213
-- Close with the PR Architecture refactoring #222
--Close with the PRs Add AccessControlDefaultAdminRules #220
&& AccessControlDefaultAdminRules improvement #226
Initially planned, but reported to a next version or rejected
-- Not possible since Hardhat does not support the new web3 js version
See hardhat with web3js v4 NomicFoundation/hardhat#4178
--No longer relevant since these two functions will be removed in the next OpenZeppelin release
See Remove custom function allowance #225
Not sure if we should do this or not, no change for the moment